<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<style>
		table{
			margin:50px;
			width:30%;
			height:15%;
			align:center;
		}
		td{
			text-align:center;
		}
	</style>
	</head>
  <body>
    <%
    	Map<String,String> map = new HashMap<String,String>();
    	map.put("百度","www.baidu.com");
    	map.put("雅虎","cn.yahoo.com");
    	map.put("谷歌","www.google.com");
    	request.setAttribute("map", map);
     %>
     <table border="1" cellpadding="0" cellspacing="0">
     	<c:forEach items="${map }" var="entry">
     		<tr>
     			<td><c:out value="${entry.key }" /></td>
     			<td><c:out value="${entry.value }" /></td>
     		</tr>
     	</c:forEach>
     </table>
  </body>
</html>
